package com.ruoyi.community.service.ec.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.community.mapper.EcOrdersMapper;
import com.ruoyi.community.domain.EcOrders;
import com.ruoyi.community.service.ec.IEcOrdersService;

/**
 * 社区电商Service业务层处理
 * 
 * @author ruoyi
 * @date 2021-08-15
 */
@Service
public class EcOrdersServiceImpl implements IEcOrdersService 
{
    @Autowired
    private EcOrdersMapper ecOrdersMapper;

    /**
     * 查询社区电商
     * 
     * @param orderId 社区电商ID
     * @return 社区电商
     */
    @Override
    public EcOrders selectEcOrdersById(Long orderId)
    {
        return ecOrdersMapper.selectEcOrdersById(orderId);
    }

    /**
     * 查询社区电商列表
     * 
     * @param ecOrders 社区电商
     * @return 社区电商
     */
    @Override
    public List<EcOrders> selectEcOrdersList(EcOrders ecOrders)
    {
        return ecOrdersMapper.selectEcOrdersList(ecOrders);
    }


    @Override
    public List<EcOrders> selectEcOrdersListByUserId(Long userId)
    {
        return ecOrdersMapper.selectEcOrdersListByUserId(userId);
    }
    /**
     * 新增社区电商
     * 
     * @param ecOrders 社区电商
     * @return 结果
     */
    @Override
    public int insertEcOrders(EcOrders ecOrders)
    {
        return ecOrdersMapper.insertEcOrders(ecOrders);
    }

    /**
     * 修改社区电商
     * 
     * @param ecOrders 社区电商
     * @return 结果
     */
    @Override
    public int updateEcOrders(EcOrders ecOrders)
    {
        return ecOrdersMapper.updateEcOrders(ecOrders);
    }

    /**
     * 批量删除社区电商
     * 
     * @param orderIds 需要删除的社区电商ID
     * @return 结果
     */
    @Override
    public int deleteEcOrdersByIds(Long[] orderIds)
    {
        return ecOrdersMapper.deleteEcOrdersByIds(orderIds);
    }

    /**
     * 删除社区电商信息
     * 
     * @param orderId 社区电商ID
     * @return 结果
     */
    @Override
    public int deleteEcOrdersById(Long orderId)
    {
        return ecOrdersMapper.deleteEcOrdersById(orderId);
    }


}
